﻿ExportInfos = function () {
    Ext.MessageBox.show({
        msg: '正在导出数据，请稍后...',
        progressText: 'Saving...',
        width: 300,
        wait: true,
        closable: true,
        waitConfig: { interval: 200 },
        icon: 'ext-mb-download'
    });
    setTimeout(function () {
        Ext.MessageBox.hide();
    }, 10000);
  
    Ext.Ajax.request({
        url: "HotelRegMag.aspx?action=Export",
        method: "POST",
        success: function (form, action) {
            Ext.MessageBox.hide();
            var result = Ext.decode(form.responseText);
            if (result.filePath) {
                var picPath = "../" + result.filePath;
                window.open(picPath, '_blank', 'width=300px,height=200px,toolbar=no,menubar=no,location=no');
            }
            else {
                Ext.Msg.alert("提 示", "无法生成Excle");
            }
        },
        failure: function () {
            Ext.MessageBox.hide();
            Ext.Msg.alert("提 示", "导出失败");
        }
    });
}



